package com.sywl.service.impl;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sywl.dao.RoomDao;
import com.sywl.orm.Room;
import com.sywl.service.RoomService;
import com.sywl.util.DataGridModel;

@Service("roomService")
@Transactional
public class RoomServiceImpl implements RoomService {

	@Resource(name="roomDao")
	private RoomDao roomDao;

	public Map<String, Object> getPageList(DataGridModel dgm, Room room)
			throws Exception {
		return roomDao.getPageList(dgm, room);
	}

	public void save(Room entity) {
		roomDao.save(entity);
	}

	public void update(Room entity) {
		roomDao.update(entity);
	}

	public void delete(Serializable id) {
		roomDao.delete(id);
	}

	public Room findById(Serializable id) {
		return roomDao.findById(id);
	}

	public List<Room> getAll() {
		return roomDao.getAll();
	}

	public List<Room> findByHQL(String hql, Object... params) {
		return roomDao.findByHQL(hql, params);
	}
}
